PostgreSQLDatabase Class

Used to open a PostgreSQL database.

Events

None

Properties

Port


Methods

None

More information available in parent classes: Database:Object


Notes

The PostgreSQLDatabase class requires the PostgreSQL Database plug-in. Place this plug-in in the REALbasic Plugins folder. The REALbasic CD includes all database plug-ins and you can always find the most current versions on REAL Software's web site, http://www.realsoftware.com.

A field specified as type Float is actually implemented by postgreSQL as a double (8 bytes).

The IsPrimary column of the FieldSchema for a postgreSQL database always returns False.

PostgreSQL dates: field types Date, Time, and TimeStamp are now properly supported; use the DateColumn and DateValue methods for a date representation of this data, or use StringValue to get a human-readable date and/or time.


Example

Dim db as PostgreSQLDatabase
db= New PostgreSQLDatabase
db.host="192.168.1.172"
db.port=5432
db.DatabaseName="myDatabase"
db.Username="Charlie"
db.Password="mashie"
If db.connect then
 //proceed with database operations
else
  MsgBox "The connection failed."
end if

This example opens an existing PostgreSQL database.


See Also

Database, DatabaseRecord, RecordSet classes.